//
//  ViewController.m
//  传感器
//
//  Created by 李昊林 on 16/8/2.
//  Copyright © 2016年 李昊林. All rights reserved.
//

#import "ViewController.h"
#import "MyView.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    _MyView = [[myView alloc] init];
    
    

}
- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event {
    _myView.backgroundColor = [UIColor greenColor];
}

- (void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event {
    
}

- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
